<?php 
class ProductosDB extends CI_Model 
{
    function __construct()
    {
        parent::__construct();
    }


    public function getProductoById($id)
    {

    	$this->load->database('local');
    	$query = $this->db->get_where('productos',array('idProductos'=> $id));
    	$this->db->close();
    	return $query;
    }

    public function getAllProductos()
    {
    	$this->load->database('local');
    	$this->db->select('*');
    	$this->db->from('productos');
    	$query = $this->db->get();
    	$this->db->close();
    	return $query;
    	
    }
}
?>